<?php

namespace App\Http\Controllers\admin;

use App\Http\Common\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class AdminController extends Controller
{
    //
    public function index(Request $request)
    {
        if($request->isMethod('ajax')){
            return "111";
        }
        return view("admin.admin.index");
    }
    public function list()
    {
        $data = Admin::all();
        $data = ['code' => 0,'msg' => 'SUCCESS','count' => count($data),'data' => objToArr($data)];
        return json_encode($data);
    }
}
